#include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
#ifdef __cplusplus
extern "C" {
#endif
btQuantizedBvhNodeData* bullet_NewbtQuantizedBvhNodeData(){
	btQuantizedBvhNodeData* wrap_out = new btQuantizedBvhNodeData();
	return wrap_out;
}

int bullet_btQuantizedBvhNodeData_GetFieldOfM_escapeIndexOrTriangleIndex(btQuantizedBvhNodeData* c_this){
	return (int)(c_this->m_escapeIndexOrTriangleIndex);
}

unsigned short** bullet_btQuantizedBvhNodeData_GetFieldOfM_quantizedAabbMax(btQuantizedBvhNodeData* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMax);
}

unsigned short** bullet_btQuantizedBvhNodeData_GetFieldOfM_quantizedAabbMin(btQuantizedBvhNodeData* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMin);
}

btQuantizedBvhNode* bullet_NewbtQuantizedBvhNode(){
	btQuantizedBvhNode* wrap_out = new btQuantizedBvhNode();
	return wrap_out;
}

int bullet_btQuantizedBvhNode_getEscapeIndex(btQuantizedBvhNode* c_this){
	int c_out = c_this->getEscapeIndex();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btQuantizedBvhNode_GetFieldOfM_escapeIndexOrTriangleIndex(btQuantizedBvhNode* c_this){
	return (int)(c_this->m_escapeIndexOrTriangleIndex);
}

unsigned short** bullet_btQuantizedBvhNode_GetFieldOfM_quantizedAabbMax(btQuantizedBvhNode* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMax);
}

unsigned short** bullet_btQuantizedBvhNode_GetFieldOfM_quantizedAabbMin(btQuantizedBvhNode* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMin);
}

int bullet_btQuantizedBvhNode_getPartId(btQuantizedBvhNode* c_this){
	int c_out = c_this->getPartId();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btQuantizedBvhNode_getTriangleIndex(btQuantizedBvhNode* c_this){
	int c_out = c_this->getTriangleIndex();
	int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btQuantizedBvhNode_isLeafNode(btQuantizedBvhNode* c_this){
	bool c_out = c_this->isLeafNode();
	bool wrap_out = (c_out);
	return wrap_out;
}

btQuantizedBvhFloatData* bullet_NewbtQuantizedBvhFloatData(){
	btQuantizedBvhFloatData* wrap_out = new btQuantizedBvhFloatData();
	return wrap_out;
}

btVector3FloatData* bullet_btQuantizedBvhFloatData_GetFieldOfM_bvhAabbMax(btQuantizedBvhFloatData* c_this){
	return (btVector3FloatData*)(&c_this->m_bvhAabbMax);
}

btVector3FloatData* bullet_btQuantizedBvhFloatData_GetFieldOfM_bvhAabbMin(btQuantizedBvhFloatData* c_this){
	return (btVector3FloatData*)(&c_this->m_bvhAabbMin);
}

btVector3FloatData* bullet_btQuantizedBvhFloatData_GetFieldOfM_bvhQuantization(btQuantizedBvhFloatData* c_this){
	return (btVector3FloatData*)(&c_this->m_bvhQuantization);
}

int bullet_btQuantizedBvhFloatData_GetFieldOfM_curNodeIndex(btQuantizedBvhFloatData* c_this){
	return (int)(c_this->m_curNodeIndex);
}

int bullet_btQuantizedBvhFloatData_GetFieldOfM_numContiguousLeafNodes(btQuantizedBvhFloatData* c_this){
	return (int)(c_this->m_numContiguousLeafNodes);
}

int bullet_btQuantizedBvhFloatData_GetFieldOfM_numQuantizedContiguousNodes(btQuantizedBvhFloatData* c_this){
	return (int)(c_this->m_numQuantizedContiguousNodes);
}

int bullet_btQuantizedBvhFloatData_GetFieldOfM_numSubtreeHeaders(btQuantizedBvhFloatData* c_this){
	return (int)(c_this->m_numSubtreeHeaders);
}

int bullet_btQuantizedBvhFloatData_GetFieldOfM_traversalMode(btQuantizedBvhFloatData* c_this){
	return (int)(c_this->m_traversalMode);
}

int bullet_btQuantizedBvhFloatData_GetFieldOfM_useQuantization(btQuantizedBvhFloatData* c_this){
	return (int)(c_this->m_useQuantization);
}

btQuantizedBvhDoubleData* bullet_NewbtQuantizedBvhDoubleData(){
	btQuantizedBvhDoubleData* wrap_out = new btQuantizedBvhDoubleData();
	return wrap_out;
}

btVector3DoubleData* bullet_btQuantizedBvhDoubleData_GetFieldOfM_bvhAabbMax(btQuantizedBvhDoubleData* c_this){
	return (btVector3DoubleData*)(&c_this->m_bvhAabbMax);
}

btVector3DoubleData* bullet_btQuantizedBvhDoubleData_GetFieldOfM_bvhAabbMin(btQuantizedBvhDoubleData* c_this){
	return (btVector3DoubleData*)(&c_this->m_bvhAabbMin);
}

btVector3DoubleData* bullet_btQuantizedBvhDoubleData_GetFieldOfM_bvhQuantization(btQuantizedBvhDoubleData* c_this){
	return (btVector3DoubleData*)(&c_this->m_bvhQuantization);
}

int bullet_btQuantizedBvhDoubleData_GetFieldOfM_curNodeIndex(btQuantizedBvhDoubleData* c_this){
	return (int)(c_this->m_curNodeIndex);
}

int bullet_btQuantizedBvhDoubleData_GetFieldOfM_numContiguousLeafNodes(btQuantizedBvhDoubleData* c_this){
	return (int)(c_this->m_numContiguousLeafNodes);
}

int bullet_btQuantizedBvhDoubleData_GetFieldOfM_numQuantizedContiguousNodes(btQuantizedBvhDoubleData* c_this){
	return (int)(c_this->m_numQuantizedContiguousNodes);
}

int bullet_btQuantizedBvhDoubleData_GetFieldOfM_numSubtreeHeaders(btQuantizedBvhDoubleData* c_this){
	return (int)(c_this->m_numSubtreeHeaders);
}

btQuantizedBvhNodeData** bullet_btQuantizedBvhDoubleData_GetFieldOfM_quantizedContiguousNodesPtr(btQuantizedBvhDoubleData* c_this){
	return (btQuantizedBvhNodeData**)(&c_this->m_quantizedContiguousNodesPtr);
}

btBvhSubtreeInfoData** bullet_btQuantizedBvhDoubleData_GetFieldOfM_subTreeInfoPtr(btQuantizedBvhDoubleData* c_this){
	return (btBvhSubtreeInfoData**)(&c_this->m_subTreeInfoPtr);
}

int bullet_btQuantizedBvhDoubleData_GetFieldOfM_traversalMode(btQuantizedBvhDoubleData* c_this){
	return (int)(c_this->m_traversalMode);
}

int bullet_btQuantizedBvhDoubleData_GetFieldOfM_useQuantization(btQuantizedBvhDoubleData* c_this){
	return (int)(c_this->m_useQuantization);
}

btQuantizedBvh* bullet_NewbtQuantizedBvh(){
	btQuantizedBvh* wrap_out = new btQuantizedBvh();
	return wrap_out;
}

void bullet_btQuantizedBvh_buildInternal(btQuantizedBvh* c_this){
	c_this->buildInternal();
}

unsigned int bullet_btQuantizedBvh_calculateSerializeBufferSize(btQuantizedBvh* c_this){
	unsigned int c_out = c_this->calculateSerializeBufferSize();
	unsigned int wrap_out = (c_out);
	return wrap_out;
}

btQuantizedBvh* bullet_btQuantizedBvh_deSerializeInPlace(btQuantizedBvh* c_this,void* i_alignedDataBuffer,unsigned int i_dataBufferSize,bool i_swapEndian){
	void * c_arg_i_alignedDataBuffer=(void *)(void*)(i_alignedDataBuffer);
	unsigned int c_arg_i_dataBufferSize=i_dataBufferSize;
	bool c_arg_i_swapEndian=i_swapEndian;
	btQuantizedBvh * c_out = c_this->deSerializeInPlace(c_arg_i_alignedDataBuffer,c_arg_i_dataBufferSize,c_arg_i_swapEndian);
	btQuantizedBvh* wrap_out = (btQuantizedBvh*)(void*)(c_out);
	return wrap_out;
}

unsigned int bullet_btQuantizedBvh_getAlignmentSerializationPadding(btQuantizedBvh* c_this){
	unsigned int c_out = c_this->getAlignmentSerializationPadding();
	unsigned int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btQuantizedBvh_isQuantized(btQuantizedBvh* c_this){
	bool c_out = c_this->isQuantized();
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btQuantizedBvh_quantize(btQuantizedBvh* c_this,unsigned short* out,btVector3* point,int isMax){
	unsigned short * c_arg_out=(unsigned short *)(void*)(out);
	btVector3 const& c_arg_point=(btVector3 const&)(*point);
	int c_arg_isMax=isMax;
	c_this->quantize(c_arg_out,c_arg_point,c_arg_isMax);
}

void bullet_btQuantizedBvh_quantizeWithClamp(btQuantizedBvh* c_this,unsigned short* out,btVector3* point2,int isMax){
	unsigned short * c_arg_out=(unsigned short *)(void*)(out);
	btVector3 const& c_arg_point2=(btVector3 const&)(*point2);
	int c_arg_isMax=isMax;
	c_this->quantizeWithClamp(c_arg_out,c_arg_point2,c_arg_isMax);
}

void bullet_btQuantizedBvh_reportAabbOverlappingNodex(btQuantizedBvh* c_this,btNodeOverlapCallback* nodeCallback,btVector3* aabbMin,btVector3* aabbMax){
	btNodeOverlapCallback * c_arg_nodeCallback=(btNodeOverlapCallback *)(void*)(nodeCallback);
	btVector3 const& c_arg_aabbMin=(btVector3 const&)(*aabbMin);
	btVector3 const& c_arg_aabbMax=(btVector3 const&)(*aabbMax);
	c_this->reportAabbOverlappingNodex(c_arg_nodeCallback,c_arg_aabbMin,c_arg_aabbMax);
}

void bullet_btQuantizedBvh_reportBoxCastOverlappingNodex(btQuantizedBvh* c_this,btNodeOverlapCallback* nodeCallback,btVector3* raySource,btVector3* rayTarget,btVector3* aabbMin,btVector3* aabbMax){
	btNodeOverlapCallback * c_arg_nodeCallback=(btNodeOverlapCallback *)(void*)(nodeCallback);
	btVector3 const& c_arg_raySource=(btVector3 const&)(*raySource);
	btVector3 const& c_arg_rayTarget=(btVector3 const&)(*rayTarget);
	btVector3 const& c_arg_aabbMin=(btVector3 const&)(*aabbMin);
	btVector3 const& c_arg_aabbMax=(btVector3 const&)(*aabbMax);
	c_this->reportBoxCastOverlappingNodex(c_arg_nodeCallback,c_arg_raySource,c_arg_rayTarget,c_arg_aabbMin,c_arg_aabbMax);
}

void bullet_btQuantizedBvh_reportRayOverlappingNodex(btQuantizedBvh* c_this,btNodeOverlapCallback* nodeCallback,btVector3* raySource,btVector3* rayTarget){
	btNodeOverlapCallback * c_arg_nodeCallback=(btNodeOverlapCallback *)(void*)(nodeCallback);
	btVector3 const& c_arg_raySource=(btVector3 const&)(*raySource);
	btVector3 const& c_arg_rayTarget=(btVector3 const&)(*rayTarget);
	c_this->reportRayOverlappingNodex(c_arg_nodeCallback,c_arg_raySource,c_arg_rayTarget);
}

void bullet_btQuantizedBvh_setQuantizationValues(btQuantizedBvh* c_this,btVector3* bvhAabbMin,btVector3* bvhAabbMax,double quantizationMargin){
	btVector3 const& c_arg_bvhAabbMin=(btVector3 const&)(*bvhAabbMin);
	btVector3 const& c_arg_bvhAabbMax=(btVector3 const&)(*bvhAabbMax);
	btScalar c_arg_quantizationMargin=quantizationMargin;
	c_this->setQuantizationValues(c_arg_bvhAabbMin,c_arg_bvhAabbMax,c_arg_quantizationMargin);
}

void bullet_btQuantizedBvh_setTraversalMode(btQuantizedBvh* c_this,btQuantizedBvh::btTraversalMode traversalMode){
	btQuantizedBvh::btTraversalMode c_arg_traversalMode=traversalMode;
	c_this->setTraversalMode(c_arg_traversalMode);
}

btVector3* bullet_btQuantizedBvh_unQuantize(btQuantizedBvh* c_this,unsigned short* vecIn){
	unsigned short const * c_arg_vecIn=(unsigned short const *)(void*)(vecIn);
	btVector3 c_out = c_this->unQuantize(c_arg_vecIn);
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

btOptimizedBvhNodeFloatData* bullet_NewbtOptimizedBvhNodeFloatData(){
	btOptimizedBvhNodeFloatData* wrap_out = new btOptimizedBvhNodeFloatData();
	return wrap_out;
}

btVector3FloatData* bullet_btOptimizedBvhNodeFloatData_GetFieldOfM_aabbMaxOrg(btOptimizedBvhNodeFloatData* c_this){
	return (btVector3FloatData*)(&c_this->m_aabbMaxOrg);
}

btVector3FloatData* bullet_btOptimizedBvhNodeFloatData_GetFieldOfM_aabbMinOrg(btOptimizedBvhNodeFloatData* c_this){
	return (btVector3FloatData*)(&c_this->m_aabbMinOrg);
}

int bullet_btOptimizedBvhNodeFloatData_GetFieldOfM_escapeIndex(btOptimizedBvhNodeFloatData* c_this){
	return (int)(c_this->m_escapeIndex);
}

char** bullet_btOptimizedBvhNodeFloatData_GetFieldOfM_pad(btOptimizedBvhNodeFloatData* c_this){
	return (char**)(&c_this->m_pad);
}

int bullet_btOptimizedBvhNodeFloatData_GetFieldOfM_subPart(btOptimizedBvhNodeFloatData* c_this){
	return (int)(c_this->m_subPart);
}

int bullet_btOptimizedBvhNodeFloatData_GetFieldOfM_triangleIndex(btOptimizedBvhNodeFloatData* c_this){
	return (int)(c_this->m_triangleIndex);
}

btOptimizedBvhNodeDoubleData* bullet_NewbtOptimizedBvhNodeDoubleData(){
	btOptimizedBvhNodeDoubleData* wrap_out = new btOptimizedBvhNodeDoubleData();
	return wrap_out;
}

btVector3DoubleData* bullet_btOptimizedBvhNodeDoubleData_GetFieldOfM_aabbMaxOrg(btOptimizedBvhNodeDoubleData* c_this){
	return (btVector3DoubleData*)(&c_this->m_aabbMaxOrg);
}

btVector3DoubleData* bullet_btOptimizedBvhNodeDoubleData_GetFieldOfM_aabbMinOrg(btOptimizedBvhNodeDoubleData* c_this){
	return (btVector3DoubleData*)(&c_this->m_aabbMinOrg);
}

int bullet_btOptimizedBvhNodeDoubleData_GetFieldOfM_escapeIndex(btOptimizedBvhNodeDoubleData* c_this){
	return (int)(c_this->m_escapeIndex);
}

char** bullet_btOptimizedBvhNodeDoubleData_GetFieldOfM_pad(btOptimizedBvhNodeDoubleData* c_this){
	return (char**)(&c_this->m_pad);
}

int bullet_btOptimizedBvhNodeDoubleData_GetFieldOfM_subPart(btOptimizedBvhNodeDoubleData* c_this){
	return (int)(c_this->m_subPart);
}

int bullet_btOptimizedBvhNodeDoubleData_GetFieldOfM_triangleIndex(btOptimizedBvhNodeDoubleData* c_this){
	return (int)(c_this->m_triangleIndex);
}

btOptimizedBvhNode* bullet_NewbtOptimizedBvhNode(){
	btOptimizedBvhNode* wrap_out = new btOptimizedBvhNode();
	return wrap_out;
}

btVector3* bullet_btOptimizedBvhNode_GetFieldOfM_aabbMaxOrg(btOptimizedBvhNode* c_this){
	return (btVector3*)(&c_this->m_aabbMaxOrg);
}

btVector3* bullet_btOptimizedBvhNode_GetFieldOfM_aabbMinOrg(btOptimizedBvhNode* c_this){
	return (btVector3*)(&c_this->m_aabbMinOrg);
}

int bullet_btOptimizedBvhNode_GetFieldOfM_escapeIndex(btOptimizedBvhNode* c_this){
	return (int)(c_this->m_escapeIndex);
}

char** bullet_btOptimizedBvhNode_GetFieldOfM_padding(btOptimizedBvhNode* c_this){
	return (char**)(&c_this->m_padding);
}

int bullet_btOptimizedBvhNode_GetFieldOfM_subPart(btOptimizedBvhNode* c_this){
	return (int)(c_this->m_subPart);
}

int bullet_btOptimizedBvhNode_GetFieldOfM_triangleIndex(btOptimizedBvhNode* c_this){
	return (int)(c_this->m_triangleIndex);
}

btBvhSubtreeInfoData* bullet_NewbtBvhSubtreeInfoData(){
	btBvhSubtreeInfoData* wrap_out = new btBvhSubtreeInfoData();
	return wrap_out;
}

unsigned short** bullet_btBvhSubtreeInfoData_GetFieldOfM_quantizedAabbMax(btBvhSubtreeInfoData* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMax);
}

unsigned short** bullet_btBvhSubtreeInfoData_GetFieldOfM_quantizedAabbMin(btBvhSubtreeInfoData* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMin);
}

int bullet_btBvhSubtreeInfoData_GetFieldOfM_rootNodeIndex(btBvhSubtreeInfoData* c_this){
	return (int)(c_this->m_rootNodeIndex);
}

int bullet_btBvhSubtreeInfoData_GetFieldOfM_subtreeSize(btBvhSubtreeInfoData* c_this){
	return (int)(c_this->m_subtreeSize);
}

btBvhSubtreeInfo* bullet_NewbtBvhSubtreeInfo(){
	btBvhSubtreeInfo* wrap_out = new btBvhSubtreeInfo();
	return wrap_out;
}

int** bullet_btBvhSubtreeInfo_GetFieldOfM_padding(btBvhSubtreeInfo* c_this){
	return (int**)(&c_this->m_padding);
}

unsigned short** bullet_btBvhSubtreeInfo_GetFieldOfM_quantizedAabbMax(btBvhSubtreeInfo* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMax);
}

unsigned short** bullet_btBvhSubtreeInfo_GetFieldOfM_quantizedAabbMin(btBvhSubtreeInfo* c_this){
	return (unsigned short**)(&c_this->m_quantizedAabbMin);
}

int bullet_btBvhSubtreeInfo_GetFieldOfM_rootNodeIndex(btBvhSubtreeInfo* c_this){
	return (int)(c_this->m_rootNodeIndex);
}

int bullet_btBvhSubtreeInfo_GetFieldOfM_subtreeSize(btBvhSubtreeInfo* c_this){
	return (int)(c_this->m_subtreeSize);
}

void bullet_btBvhSubtreeInfo_setAabbFromQuantizeNode(btBvhSubtreeInfo* c_this,btQuantizedBvhNode* quantizedNode){
	btQuantizedBvhNode const& c_arg_quantizedNode=(btQuantizedBvhNode const&)(*quantizedNode);
	c_this->setAabbFromQuantizeNode(c_arg_quantizedNode);
}

#ifdef __cplusplus
}
#endif
